Skip to content

test: integration tests can now call dynamic libraries#1690

Open
ostylk wants to merge 1 commit intowild-linker:mainfrom
ostylk:push-ntlnsyyuosmx
Open

test: integration tests can now call dynamic libraries#1690
ostylk wants to merge 1 commit intowild-linker:mainfrom
ostylk:push-ntlnsyyuosmx

Conversation

@ostylk
Copy link

@ostylk ostylk commented Mar 13, 2026

Implements #1687 .

Using //#RunDynSym:foo the output binary is treated as a shared library and loaded into the current test process.
The function foo needs to return an integer and it succeeds if it returns 42.

Cross compiled libraries cannot be tested that way.

Is there one test in particular where you want to use this feature? I enabled it for shared.c and called foo().

.with_context(|| format!("Invalid Mode `{arg}`"))?;
if mode == Mode::Dynamic {
config.assertions.expect_dynamic = true;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, specifying //#Mode:dynamic implicitly sets //#RunEnabled:false (introduced in #1033), so I think this needs to be corrected.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that has been reverted in b88576e ?

@ostylk ostylk force-pushed the push-ntlnsyyuosmx branch from a178060 to 4c28c32 Compare March 14, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for loading and running shared objects to test framework

2 participants